package com.bbb.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bbb.dao.UserMapper;
import com.bbb.pojo.User;
import com.bbb.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {

    @Autowired
    private UserMapper userMapper;
//
//    @Override
//    public User login(User user) {
//
//    }
//
    @Override
    public List<User> getAll() {
        List<User> users = userMapper.selectList(null);
        return users;
    }

    @Override
    public User login(User user) {
        return userMapper.login(user);
    }

    @Override
    public int update(User user) {
        return userMapper.update(user);
    }

//    @Override
//    public boolean insert(User user) {
//        int insert = userMapper.insert(user);
//        return insert > 0;
//    }

}
